// import qs from 'qs'
import axios from 'axios'

const instance = axios.create({
  baseURL: 'https://xldou.cn/api',
  timeout: '60000',
  // paramsSerializer: function (params) {
  //   return qs.stringify(params, { arrayFormat: 'comma' })
  // }
})

instance.interceptors.response.use(function (response) {
  
  return response.data;
  
}, function (error) {
  // Any status codes that falls outside the range of 2xx cause this function to trigger
  // Do something with response error
  return Promise.reject(error);
});

export default instance
